#include "membackend/accurateTransactionQueue.h"

TransactionQueue::TransactionQueue() {
    transaction_queue_delay = 1;
}

TransactionQueue::TransactionQueue(const AddressMappingConfig *amp) {
    transaction_queue_delay = 1;
    queue_policy = amp->getQueuePolicy();
}

// Make sure to use the correct type as declared in the header, e.g., MemTransaction or sst::Transaction
uint64_t TransactionQueue::Process(Transaction &transaction, uint64_t time) {
    uint64_t delay = 0;

    delay = this -> transaction_queue_delay;
    std::cout << "TransactionQueue::Processing transaction with ID: " << transaction.getId() 
              << " at time: " << time 
              << " with delay: " << std::dec << delay << std::endl;

    return delay;
}